import React from 'react'
import News from './index'
import NewsDetail from './detail/index'
import { Route, Switch, Redirect } from 'react-router-dom'
import { Layout, Spin } from 'antd'
import ROUTES from '@utils/routes'
const { Header, Content } = Layout

export default class NewsRoute extends React.Component{
    constructor(props) {
        super(props)
    }

    render() {
        return (
            <div>
                <Layout>
                    <Content>
                        <div>
                            <Switch>
                                <Route path={ROUTES.NEWS.INDEX.URL} exact render={()=><News/>}></Route>
                                <Route path={ROUTES.NEWS.DETAIL.URL} exact render={()=><NewsDetail/>}></Route>
                            </Switch>
                        </div>
                    </Content>
                </Layout>
            </div>
        )
    }
}